public class UpdateRoomInfoServlet extends HttpServlet{
	private BllFactory bllFactory = BllFactory.getBllFactory();

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.setCharacterEncoding("utf-8");
		resp.setContentType("text/html;charset = utf-8");
		
		/*int id = Integer.getInteger(req.getParameter("id"));
		String idcard = new String(req.getParameter("idcard").getBytes("ISO-8859-1"),"utf-8");
		String starttime = new String(req.getParameter("starttime").getBytes("ISO-8859-1"),"utf-8");
		String leavetime = new String(req.getParameter("leavetime").getBytes("ISO-8859-1"),"utf-8");
		int roomid = Integer.parseInt(req.getParameter("roomid"));*/
		
		int roomid = Integer.parseInt(req.getParameter("roomid"));
		int roomstatus = Integer.parseInt(req.getParameter("roomstatus"));
		int roomtype = Integer.parseInt(req.getParameter("roomtype"));
		int roomprice = Integer.parseInt(req.getParameter("roomprice"));
		
		BLLRoom bllRoom = bllFactory.getInstance(BLLRoom.class);
		boolean check = bllRoom.updateRoomInfo(roomid, roomstatus, roomtype, roomprice);
		
		PrintWriter pw = resp.getWriter();
		pw.print(check);
		pw.close();
	}
	
	
}